#!/usr/bin/python
# -*- coding: UTF-8 -*-

""" 
@version: 1.0
@author: jin.li.o
@license: Apache Licence 
@contact: x.leevin@gmail.com
@software: PyCharm
@file: clazz_i_01.py
@time: 2018/9/30
"""

listZ = [1, 7, 4, 8, 9, 34, 2]
print("排序前:{0}".format(listZ))

for i1 in range(0, len(listZ)):

    for i2 in range(0, len(listZ) - 1):

        if listZ[i2] > listZ[i2 + 1]:
            temp = listZ[i2]
            listZ[i2] = listZ[i2 + 1]
            listZ[i2 + 1] = temp

print("排序后:{0}".format(listZ))
